home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 52
/
Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso
/
Aminet
/
misc
/
emu
/
Apex-src.lha
/
PRM.XPL
< prev
next >
Wrap
Text File
|
2001-09-30
|
640b
|
34 lines
\PRM.XPL APR-10-87
\This program lists a file on the printer and adds a left margin.
\REVISION HISTORY:
\MAR-14-86, Original.
\APR-10-87, Changed string conventions.
code CHIN=7, CHOUT=8, TEXT=12, OPENI=13,
OPENO=14, CLOSE=15;
int CH;
def PR=2, DISK=3;
def TAB=$09, FF=$0C, CR=$0D, EOF=$1A;
begin \MAIN
TEXT(0,"-- FILE PRINT PROGRAM --
(WITH MARGIN)
");
OPENI(DISK);
OPENO(PR);
CHOUT(PR,TAB);
loop begin
CH:= CHIN(DISK);
if CH = EOF then quit;
CHOUT(PR,CH);
if CH = CR then CHOUT(PR,TAB);
if CH = FF then CHOUT(PR,TAB);
end;
CLOSE(PR);
end; \MAIN
F then quit;
CHOUT(PR,CH);
if CH = CR t